﻿using DotNetExtensions.Core.Mapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace DotNetExtensions.Core.Extensions
{
    public static class ObjectExtensions
    {
        public static void MapTo<TSource, TTarget>(this TSource source, TTarget target) where TSource : class where TTarget : class, new()
        {
            target = ExpressionMapper<TSource, TTarget>.Map(source);
        }
        public static TTarget MapTo<TSource, TTarget>(this TSource source) where TSource : class where TTarget : class, new()
        {
            return ExpressionMapper<TSource, TTarget>.Map(source);
        }
    }
}
